package com.regent.central.infrastructure.common;

import java.security.MessageDigest;

/**
 * MD5 工具类
 *
 * @author 杨昌沛 646742615@qq.com
 * @date 2018-06-19 10:34
 **/
public abstract class Md5 {

    public static byte[] encodeMd5(byte[] bytes) {
        try {
            final MessageDigest MD5 = MessageDigest.getInstance("MD5");
            return MD5.digest(bytes);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

}
